#include "asm.h"
#include "regdef.h"
#include "inst_test.h"

LEAF(n22_slti_test)
    
    addi.w s0, s0 ,1
    li  s2, 0x00
###test inst
    TEST_SLTI(0xd9d129b5, 0x00000988, 0x1)
    TEST_SLTI(0xbc13c90c, 0x000005e9, 0x1)
    TEST_SLTI(0x9c7c8fa6, 0x00000db8, 0x1)
    TEST_SLTI(0xfa9c8750, 0x000007fe, 0x1)
    TEST_SLTI(0x5a5723dc, 0x00000220, 0x0)
    TEST_SLTI(0x3bddb5bc, 0x00000444, 0x0)
    TEST_SLTI(0xf3dccb50, 0x000003fb, 0x1)
    TEST_SLTI(0xdb8e5d8c, 0x00000516, 0x1)
    TEST_SLTI(0x1da08490, 0x00000dfc, 0x0)
    TEST_SLTI(0x8e7b1468, 0x00000fa2, 0x1)
    TEST_SLTI(0xaa2475a4, 0x00000422, 0x1)
    TEST_SLTI(0xaafd2bb9, 0x00000940, 0x1)
    TEST_SLTI(0xf19ccee8, 0x00000a93, 0x1)
    TEST_SLTI(0xca735fec, 0x00000d80, 0x1)
    TEST_SLTI(0xc79b9e5b, 0x00000e28, 0x1)
    TEST_SLTI(0x9e0a8c68, 0x000003e6, 0x1)
    TEST_SLTI(0xd72d13b0, 0x000002b7, 0x1)
    TEST_SLTI(0x5d7ca028, 0x00000db1, 0x0)
    TEST_SLTI(0x9bf7ee64, 0x00000669, 0x1)
    TEST_SLTI(0x0d427626, 0x00000a20, 0x0)
    TEST_SLTI(0x032facb0, 0x00000824, 0x0)
    TEST_SLTI(0xa4e2d4d0, 0x0000071a, 0x1)
    TEST_SLTI(0xe39103b2, 0x00000ee8, 0x1)
    TEST_SLTI(0xb9dedbd8, 0x00000ff6, 0x1)
    TEST_SLTI(0x6ade05c0, 0x00000342, 0x0)
    TEST_SLTI(0xf09802fe, 0x00000848, 0x1)
    TEST_SLTI(0x69ae0890, 0x00000c64, 0x0)
    TEST_SLTI(0x9e94a558, 0x00000346, 0x1)
    TEST_SLTI(0x466f2934, 0x0000008c, 0x0)
    TEST_SLTI(0x0e10b5f4, 0x00000612, 0x0)
    TEST_SLTI(0x3cbdb4d8, 0x00000e48, 0x0)
    TEST_SLTI(0x48c139e4, 0x000001fe, 0x0)
    TEST_SLTI(0xf12495c0, 0x00000276, 0x1)
    TEST_SLTI(0xee7779f8, 0x00000846, 0x1)
    TEST_SLTI(0x825171d4, 0x000001aa, 0x1)
    TEST_SLTI(0x869319b9, 0x00000f80, 0x1)
    TEST_SLTI(0x30309ba0, 0x0000060f, 0x0)
    TEST_SLTI(0xe03883f0, 0x000006e8, 0x1)
    TEST_SLTI(0xda55bac8, 0x000005da, 0x1)
    TEST_SLTI(0xc6b87920, 0x00000c64, 0x1)
    TEST_SLTI(0x07ce3c21, 0x000000d0, 0x0)
    TEST_SLTI(0xaaf91929, 0x00000e1c, 0x1)
    TEST_SLTI(0xf6fd1f6c, 0x00000ab3, 0x1)
    TEST_SLTI(0x23d6311c, 0x000000ab, 0x0)
    TEST_SLTI(0x2f8fcbc4, 0x00000280, 0x0)
    TEST_SLTI(0xb363ac00, 0x0000061e, 0x1)
    TEST_SLTI(0xd900bca1, 0x00000764, 0x1)
    TEST_SLTI(0x286a22d8, 0x00000cbf, 0x0)
    TEST_SLTI(0x4eb46b88, 0x00000e78, 0x0)
    TEST_SLTI(0xc1c279a0, 0x00000f30, 0x1)
    TEST_SLTI(0xaa47d640, 0x00000fea, 0x1)
    TEST_SLTI(0x2df21920, 0x000001c6, 0x0)
    TEST_SLTI(0x61aab5a0, 0x00000551, 0x0)
    TEST_SLTI(0x8961e1cc, 0x00000270, 0x1)
    TEST_SLTI(0x9a575ae0, 0x00000d5d, 0x1)
    TEST_SLTI(0x6267e6c3, 0x00000e60, 0x0)
    TEST_SLTI(0x4707aae0, 0x00000813, 0x0)
    TEST_SLTI(0xdf338b11, 0x00000c14, 0x1)
    TEST_SLTI(0x74a303d0, 0x00000e3f, 0x0)
    TEST_SLTI(0x9657c972, 0x0000036e, 0x1)
    TEST_SLTI(0x28fec0a0, 0x000002b8, 0x0)
    TEST_SLTI(0x656d61a8, 0x000006cc, 0x0)
    TEST_SLTI(0xc2ff1fac, 0x00000c10, 0x1)
    TEST_SLTI(0x99d8263c, 0x00000ced, 0x1)
    TEST_SLTI(0x268945ee, 0x00000ea4, 0x0)
    TEST_SLTI(0x5d125cfa, 0x000003d8, 0x0)
    TEST_SLTI(0x945feee4, 0x00000c69, 0x1)
    TEST_SLTI(0xa125469a, 0x00000b56, 0x1)
    TEST_SLTI(0x5b9504bd, 0x00000fc0, 0x0)
    TEST_SLTI(0x8bcff665, 0x00000581, 0x1)
    TEST_SLTI(0x54ce1638, 0x00000554, 0x0)
    TEST_SLTI(0xd3798b40, 0x00000b88, 0x1)
    TEST_SLTI(0x65bf3f80, 0x00000b00, 0x0)
    TEST_SLTI(0x7d701d1c, 0x00000914, 0x0)
    TEST_SLTI(0x2db1f790, 0x00000714, 0x0)
    TEST_SLTI(0x7b1cd680, 0x00000140, 0x0)
    TEST_SLTI(0xe8ddeba8, 0x00000670, 0x1)
    TEST_SLTI(0xfca73e0c, 0x00000d77, 0x1)
    TEST_SLTI(0x88de5aca, 0x0000048c, 0x1)
    TEST_SLTI(0x3997a398, 0x00000afe, 0x0)
    TEST_SLTI(0xd38a055e, 0x000003bd, 0x1)
    TEST_SLTI(0x2758c952, 0x00000af0, 0x0)
    TEST_SLTI(0x6669f950, 0x00000e01, 0x0)
    TEST_SLTI(0xecf1f250, 0x00000b70, 0x1)
    TEST_SLTI(0xc58346ba, 0x00000e9e, 0x1)
    TEST_SLTI(0x0a3953d5, 0x00000808, 0x0)
    TEST_SLTI(0xdcbf75c0, 0x00000376, 0x1)
    TEST_SLTI(0x937989cc, 0x00000f74, 0x1)
    TEST_SLTI(0xbcf1d9f8, 0x00000bad, 0x1)
    TEST_SLTI(0x32494814, 0x0000073d, 0x0)
    TEST_SLTI(0x8597e19d, 0x00000c17, 0x1)
    TEST_SLTI(0x883c0c54, 0x00000848, 0x1)
    TEST_SLTI(0xb8d3b526, 0x00000036, 0x1)
    TEST_SLTI(0xcbc4663a, 0x00000cfe, 0x1)
    TEST_SLTI(0x442628e4, 0x00000076, 0x0)
    TEST_SLTI(0xf53e8868, 0x000005e6, 0x1)
    TEST_SLTI(0x8348eb10, 0x00000500, 0x1)
    TEST_SLTI(0x448b60e0, 0x00000e51, 0x0)
    TEST_SLTI(0xb3e152a2, 0x0000070d, 0x1)
    TEST_SLTI(0x180ccff0, 0x0000060d, 0x0)
    TEST_SLTI(0x3f22cb44, 0x000001d2, 0x0)
    TEST_SLTI(0x703f8a72, 0x00000948, 0x0)
    TEST_SLTI(0xdf85d006, 0x000006f1, 0x1)
    TEST_SLTI(0x9407fc00, 0x0000080c, 0x1)
    TEST_SLTI(0xb4e2a5bc, 0x0000084b, 0x1)
    TEST_SLTI(0xa02c1aa2, 0x00000ecb, 0x1)
    TEST_SLTI(0x3e83b8a0, 0x000003e6, 0x0)
    TEST_SLTI(0xc64eae40, 0x00000c1c, 0x1)
    TEST_SLTI(0xfb0fc32c, 0x0000026f, 0x1)
    TEST_SLTI(0xb8d33566, 0x00000810, 0x1)
    TEST_SLTI(0x0c938a60, 0x00000e8b, 0x0)
    TEST_SLTI(0x37bf06a0, 0x00000fc8, 0x0)
    TEST_SLTI(0xf78cb180, 0x00000bb8, 0x1)
    TEST_SLTI(0x13492c46, 0x00000e4e, 0x0)
    TEST_SLTI(0xc7ce8857, 0x00000efa, 0x1)
    TEST_SLTI(0x6ba76bc0, 0x000006e0, 0x0)
    TEST_SLTI(0x0de3c024, 0x00000d60, 0x0)
    TEST_SLTI(0x9e3fddce, 0x00000154, 0x1)
    TEST_SLTI(0x440cac96, 0x000001a4, 0x0)
    TEST_SLTI(0xd4c8a1c8, 0x000005f4, 0x1)
    TEST_SLTI(0x351f0854, 0x00000d08, 0x0)
    TEST_SLTI(0xde09743c, 0x0000030e, 0x1)
    TEST_SLTI(0x85c7db36, 0x0000028e, 0x1)
    TEST_SLTI(0x018d8b10, 0x00000290, 0x0)
    TEST_SLTI(0x4f8abf20, 0x00000312, 0x0)
    TEST_SLTI(0xe83d342a, 0x000003bf, 0x1)
    TEST_SLTI(0x47d3b94a, 0x000006c4, 0x0)
    TEST_SLTI(0x53514a00, 0x000007e2, 0x0)
    TEST_SLTI(0x313f5220, 0x00000c48, 0x0)
    TEST_SLTI(0x4b78c354, 0x000008ca, 0x0)
    TEST_SLTI(0xed35c6c9, 0x000009f4, 0x1)
    TEST_SLTI(0x2a506368, 0x000001a6, 0x0)
    TEST_SLTI(0x38f47f2c, 0x00000f04, 0x0)
    TEST_SLTI(0x973b2c38, 0x000005ac, 0x1)
    TEST_SLTI(0x5b2b5b16, 0x00000a03, 0x0)
    TEST_SLTI(0xa1466aef, 0x000001aa, 0x1)
    TEST_SLTI(0xff3ad1e6, 0x000003fc, 0x1)
    TEST_SLTI(0xcf3b4e50, 0x00000f30, 0x1)
    TEST_SLTI(0x4f6afec0, 0x0000065a, 0x0)
    TEST_SLTI(0x76807780, 0x00000bb0, 0x0)
    TEST_SLTI(0xc2bc12c0, 0x00000a9c, 0x1)
    TEST_SLTI(0xa670369c, 0x0000066d, 0x1)
    TEST_SLTI(0x6e701f70, 0x00000650, 0x0)
    TEST_SLTI(0x9e669bc0, 0x00000a20, 0x1)
    TEST_SLTI(0xb88e5a50, 0x000003dd, 0x1)
    TEST_SLTI(0x9d8a5458, 0x00000ebc, 0x1)
    TEST_SLTI(0xb376373e, 0x00000178, 0x1)
    TEST_SLTI(0x0c5c9db3, 0x0000061b, 0x0)
    TEST_SLTI(0x9b79a3d8, 0x00000060, 0x1)
    TEST_SLTI(0xe5cb14c8, 0x0000090c, 0x1)
    TEST_SLTI(0xc5ffc83c, 0x00000f05, 0x1)
    TEST_SLTI(0xb321a45f, 0x000007b2, 0x1)
    TEST_SLTI(0xbe9acec8, 0x00000266, 0x1)
    TEST_SLTI(0x85b6bec0, 0x00000280, 0x1)
    TEST_SLTI(0x104087d8, 0x000008cd, 0x0)
    TEST_SLTI(0x47d5f3d4, 0x00000dda, 0x0)
    TEST_SLTI(0xe71cd5f0, 0x000004a6, 0x1)
    TEST_SLTI(0x1e0f8f82, 0x00000784, 0x0)
    TEST_SLTI(0x1026a9de, 0x000004c4, 0x0)
    TEST_SLTI(0x1c3fe1ee, 0x000005ae, 0x0)
    TEST_SLTI(0xfcabc854, 0x00000965, 0x1)
    TEST_SLTI(0x68b34bf0, 0x00000284, 0x0)
    TEST_SLTI(0x7bba498e, 0x00000f2d, 0x0)
    TEST_SLTI(0xc7df176e, 0x0000007a, 0x1)
    TEST_SLTI(0x86747248, 0x00000d1f, 0x1)
    TEST_SLTI(0xd54942c0, 0x0000001b, 0x1)
    TEST_SLTI(0x991554c4, 0x00000aad, 0x1)
    TEST_SLTI(0x907f7dc0, 0x00000ab4, 0x1)
    TEST_SLTI(0xa97e43ec, 0x00000780, 0x1)
    TEST_SLTI(0x77ad839e, 0x00000b1e, 0x0)
    TEST_SLTI(0x18626458, 0x000002cc, 0x0)
    TEST_SLTI(0x51fe55f0, 0x00000a55, 0x0)
    TEST_SLTI(0xf9b5d7c1, 0x000001e8, 0x1)
    TEST_SLTI(0xc3dcf7f1, 0x0000010e, 0x1)
    TEST_SLTI(0x8a2b2010, 0x000000ba, 0x1)
    TEST_SLTI(0x7b29e272, 0x0000046e, 0x0)
    TEST_SLTI(0xb2b20a1c, 0x00000910, 0x1)
    TEST_SLTI(0x9b0425c0, 0x00000100, 0x1)
    TEST_SLTI(0xa8a4fecb, 0x0000082b, 0x1)
    TEST_SLTI(0x13d5fe08, 0x00000de4, 0x0)
    TEST_SLTI(0x1213f626, 0x0000019c, 0x0)
    TEST_SLTI(0xbc4dc5ce, 0x00000190, 0x1)
    TEST_SLTI(0x0e2c7a84, 0x00000250, 0x0)
    TEST_SLTI(0x87318000, 0x00000048, 0x1)
    TEST_SLTI(0x4f6353e3, 0x00000f0a, 0x0)
    TEST_SLTI(0xf3162eb4, 0x000007b4, 0x1)
    TEST_SLTI(0xf73c9f5c, 0x00000d2f, 0x1)
    TEST_SLTI(0x0f83a1e6, 0x00000382, 0x0)
    TEST_SLTI(0xb575b172, 0x00000d26, 0x1)
    TEST_SLTI(0x55673b4f, 0x00000681, 0x0)
    TEST_SLTI(0x45c32ed4, 0x0000036a, 0x0)
    TEST_SLTI(0xf98ed1fc, 0x00000f84, 0x1)
    TEST_SLTI(0x00fa5c08, 0x00000d8c, 0x0)
    TEST_SLTI(0x52e28a84, 0x00000e58, 0x0)
    TEST_SLTI(0xefaacac8, 0x00000867, 0x1)
    TEST_SLTI(0xc27592b8, 0x000006c4, 0x1)
    TEST_SLTI(0x45225370, 0x000001b3, 0x0)
    TEST_SLTI(0x0e413b53, 0x000000f5, 0x0)
    TEST_SLTI(0x1b19286c, 0x00000b8d, 0x0)
    TEST_SLTI(0x27e8e268, 0x000001e0, 0x0)
    TEST_SLTI(0x37926548, 0x00000000, 0x0)
    TEST_SLTI(0x9a74b580, 0x00000000, 0x1)
    TEST_SLTI(0xb4a7def0, 0x00000000, 0x1)
    TEST_SLTI(0x6bb7ee0d, 0x00000000, 0x0)
    TEST_SLTI(0xd608b460, 0x00000000, 0x1)
    TEST_SLTI(0xd25d6422, 0x00000000, 0x1)
    TEST_SLTI(0x226af9c0, 0x00000000, 0x0)
    TEST_SLTI(0x68997bdd, 0x00000000, 0x0)
    TEST_SLTI(0x6bc2f560, 0x00000000, 0x0)
    TEST_SLTI(0x3e9fe5a2, 0x00000000, 0x0)
    TEST_SLTI(0xcd97048e, 0x00000000, 0x1)
    TEST_SLTI(0x1108b6d4, 0x00000000, 0x0)
    TEST_SLTI(0x16293334, 0x00000000, 0x0)
    TEST_SLTI(0x86407bb0, 0x00000000, 0x1)
    TEST_SLTI(0x8d34a030, 0x00000000, 0x1)
    TEST_SLTI(0x4162f981, 0x00000000, 0x0)
    TEST_SLTI(0x58a69718, 0x00000000, 0x0)
    TEST_SLTI(0xd522770a, 0x00000000, 0x1)
    TEST_SLTI(0x1221adca, 0x00000000, 0x0)
    TEST_SLTI(0x5a159dc3, 0x00000000, 0x0)
    TEST_SLTI(0xe5505b24, 0x00000000, 0x1)
    TEST_SLTI(0xda7b1d60, 0x00000000, 0x1)
    TEST_SLTI(0xaf2d1540, 0x00000000, 0x1)
    TEST_SLTI(0x7945204a, 0x00000000, 0x0)
    TEST_SLTI(0x7fb969a0, 0x00000000, 0x0)
    TEST_SLTI(0x8d7dd358, 0x00000000, 0x1)
    TEST_SLTI(0xf2b23a40, 0x00000000, 0x1)
    TEST_SLTI(0x58f0f6e0, 0x00000000, 0x0)
    TEST_SLTI(0x69b63e31, 0x00000000, 0x0)
    TEST_SLTI(0xc919d37c, 0x00000000, 0x1)
    TEST_SLTI(0xa4a9dcb5, 0x00000000, 0x1)
    TEST_SLTI(0x7d8ba484, 0x00000000, 0x0)
    TEST_SLTI(0x84184007, 0x00000000, 0x1)
    TEST_SLTI(0x4b29d000, 0x00000000, 0x0)
    TEST_SLTI(0xc74cd6ea, 0x00000000, 0x1)
    TEST_SLTI(0xff0a4d60, 0x00000000, 0x1)
    TEST_SLTI(0x2efaab54, 0x00000000, 0x0)
    TEST_SLTI(0x65d6057a, 0x00000000, 0x0)
    TEST_SLTI(0x4a391008, 0x00000000, 0x0)
    TEST_SLTI(0x58ca24f4, 0x00000000, 0x0)
    TEST_SLTI(0x08fcc510, 0x00000000, 0x0)
    TEST_SLTI(0x4111c2d0, 0x00000000, 0x0)
    TEST_SLTI(0x0558e878, 0x00000000, 0x0)
    TEST_SLTI(0x2f54e72c, 0x00000000, 0x0)
    TEST_SLTI(0xec4a1ea0, 0x00000000, 0x1)
    TEST_SLTI(0xe2a64e16, 0x00000000, 0x1)
    TEST_SLTI(0x1973d690, 0x00000000, 0x0)
    TEST_SLTI(0xd42c43d0, 0x00000000, 0x1)
    TEST_SLTI(0xfb04a4f0, 0x00000000, 0x1)
    TEST_SLTI(0xba63960c, 0x00000000, 0x1)
    TEST_SLTI(0x00000000, 0x00000ef6, 0x0)
    TEST_SLTI(0x00000000, 0x0000038c, 0x1)
    TEST_SLTI(0x00000000, 0x00000ac4, 0x0)
    TEST_SLTI(0x00000000, 0x0000016d, 0x1)
    TEST_SLTI(0x00000000, 0x000002c8, 0x1)
    TEST_SLTI(0x00000000, 0x00000c72, 0x0)
    TEST_SLTI(0x00000000, 0x0000024e, 0x1)
    TEST_SLTI(0x00000000, 0x00000614, 0x1)
    TEST_SLTI(0x00000000, 0x0000051a, 0x1)
    TEST_SLTI(0x00000000, 0x00000130, 0x1)
    TEST_SLTI(0x00000000, 0x0000049a, 0x1)
    TEST_SLTI(0x00000000, 0x00000a7c, 0x0)
    TEST_SLTI(0x00000000, 0x00000a84, 0x0)
    TEST_SLTI(0x00000000, 0x0000002c, 0x1)
    TEST_SLTI(0x00000000, 0x0000071e, 0x1)
    TEST_SLTI(0x00000000, 0x00000489, 0x1)
    TEST_SLTI(0x00000000, 0x00000115, 0x1)
    TEST_SLTI(0x00000000, 0x00000fb3, 0x0)
    TEST_SLTI(0x00000000, 0x000007f4, 0x1)
    TEST_SLTI(0x00000000, 0x00000cf5, 0x0)
    TEST_SLTI(0x00000000, 0x00000ed0, 0x0)
    TEST_SLTI(0x00000000, 0x0000060c, 0x1)
    TEST_SLTI(0x00000000, 0x00000a44, 0x0)
    TEST_SLTI(0x00000000, 0x000001b8, 0x1)
    TEST_SLTI(0x00000000, 0x00000fa7, 0x0)
    TEST_SLTI(0x00000000, 0x00000fbb, 0x0)
    TEST_SLTI(0x00000000, 0x00000481, 0x1)
    TEST_SLTI(0x00000000, 0x00000bc8, 0x0)
    TEST_SLTI(0x00000000, 0x00000978, 0x0)
    TEST_SLTI(0x00000000, 0x000003c0, 0x1)
    TEST_SLTI(0x00000000, 0x00000066, 0x1)
    TEST_SLTI(0x00000000, 0x00000b0c, 0x0)
    TEST_SLTI(0x00000000, 0x000003d8, 0x1)
    TEST_SLTI(0x00000000, 0x00000307, 0x1)
    TEST_SLTI(0x00000000, 0x00000ecd, 0x0)
    TEST_SLTI(0x00000000, 0x00000de2, 0x0)
    TEST_SLTI(0x00000000, 0x00000282, 0x1)
    TEST_SLTI(0x00000000, 0x0000058d, 0x1)
    TEST_SLTI(0x00000000, 0x00000056, 0x1)
    TEST_SLTI(0x00000000, 0x00000e50, 0x0)
    TEST_SLTI(0x00000000, 0x00000f0d, 0x0)
    TEST_SLTI(0x00000000, 0x00000f00, 0x0)
    TEST_SLTI(0x00000000, 0x000002d0, 0x1)
    TEST_SLTI(0x00000000, 0x00000cea, 0x0)
    TEST_SLTI(0x00000000, 0x00000cc9, 0x0)
    TEST_SLTI(0x00000000, 0x00000570, 0x1)
    TEST_SLTI(0x00000000, 0x00000550, 0x1)
    TEST_SLTI(0x00000000, 0x00000a91, 0x0)
    TEST_SLTI(0x00000000, 0x00000096, 0x1)
    TEST_SLTI(0x00000000, 0x00000394, 0x1)
    TEST_SLTI(0x00000000, 0x00000000, 0x0)
###detect exception
    bne s2, zero, inst_error
    nop
###score ++
    addi.w s3, s3, 1
###output (s0<<24)|s3
inst_error:  
    slli.w t1, s0, 24
    NOP4
    or t0, t1, s3 
    NOP4
    st.w t0, s1, 0
    jirl zero, ra, 0
END(n22_slti_test)
